<style>
#result {
	height:20px;
	font-size:11px;
	font-family:Arial, Helvetica, sans-serif;
	color:#333;
	padding:5px;
	margin-bottom:60px;
	background-color:#9e1aaa;
}
.suggestionsBox {
	position: absolute;
	left: 0px;
	top:0px;
	margin: 30px 0px 0px 0px;
	width: 150px;
	padding:0px;
	background-color: #d065da;
	border-top: 3px solid #FFFFFF;
	color: #222;
	height: 20px;
}
.suggestionList {
	margin: 0px;
	padding: 5px;
	height: 20px;
}
.suggestionList ul li {
	list-style:none;
	margin: 0px;
	padding: 0px;
	border-bottom:1px dotted #666;
	cursor: pointer;
}
.suggestionList ul li:hover {
	background-color: #f29afa;
	color:#333;
}
ul {
	font-family:Arial, Helvetica, sans-serif;
	font-size:11px;
	color:#FFF;
	padding:0;
	margin:0;
}

.load{
background-image:url(images/loader.gif);
background-position:right;
background-repeat:no-repeat;
}

#suggest {
	position:relative;
	height: 20px;
}
#searchid {
	font-size:11px;
}
</style>
<script type="text/javascript">
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<body onLoad="MM_preloadImages('images/bc-upload-on.png')">
<h1>Profilo utente <?php echo $this->_username; ?></h1>
<?
$born_day = "";
$born_month = "";
$born_year = "";
if($this->_dt_nascita!=null)
{
	$born_day = substr($this->_dt_nascita, 8, 2);
	$born_month = substr($this->_dt_nascita, 5, 2);
	$born_year = substr($this->_dt_nascita, 0, 4);
	$dt_nascita_format = $born_day."/".$born_month."/".$born_year;
}
else
	$dt_nascita_format = "";
	
if($this->_dt_da_tour!=null)
{
	$born_day = substr($this->_dt_da_tour, 8, 2);
	$born_month = substr($this->_dt_da_tour, 5, 2);
	$born_year = substr($this->_dt_da_tour, 0, 4);
	$dt_da_tour_format = $born_day."/".$born_month."/".$born_year;
}
else
	$dt_da_tour_format = "";
	
if($this->_dt_a_tour!=null)
{
	$born_day = substr($this->_dt_a_tour, 8, 2);
	$born_month = substr($this->_dt_a_tour, 5, 2);
	$born_year = substr($this->_dt_a_tour, 0, 4);
	$dt_a_tour_format = $born_day."/".$born_month."/".$born_year;
}
else
	$dt_a_tour_format = "";
	
if($this->_name=="" || $dt_nascita_format=="00/00/0000" || $this->_id_citta==0 || $this->_id_citta=="" || $this->_sesso=="" || $this->_prefisso1=="" || $this->_telefono1=="" || $this->_annuncio=="" || $this->_f_attivo == "N")
{
	$sn_profilo_attivo = "N";
	$stato_profilo = "<font color='#FF0000' style='font-weight:bold'>PROFILO NON ATTIVO</font>";	
}
else
{
	$sn_profilo_attivo = "S";
	$stato_profilo = "<font color='#00CC00' style='font-weight:bold'>PROFILO ATTIVO</font>";
}

echo("<div align='right'>$stato_profilo</div>");
?>
<a name="tabs-3"></a>
<br>
<div id="tabs" style="font-size:115%;">
	<ul>
		<li><a href="#tabs-1">Dati personali</a></li>
		<li><a href="#tabs-2">Password</a></li>
		<li><a href="#tabs-3">Carica Foto</a></li>
		<li><a href="#tabs-4">Statistiche</a></li>
	</ul>
    


	<div id="tabs-1" style="background:url(images/bggm.png) repeat-x bottom; font-size:11px;">
	<h1>Modifica dati personali</h1>
		
		<form action="profile_action.php" method="POST">
		
			<table width="96%" border="0" align="center" style="font-size:11px">
              <tr>
                <td colspan="3" align="right"><label style="width:95px; height:15px;background:url(images/element/bg-form-obbli.jpg) repeat-x;"><font style="font-size:9px; color:#953585">Campi obbligatori&nbsp;</font></label></td>
              </tr>
              <tr>
                <td>Nome:<br />
                  <input type="text" value="<?php echo $this->_name; ?>" name="name" class="input_form ui-corner-all" maxlength="20" style="background:url(images/element/bg-form-obbli.jpg) repeat-x #FFFFFF; color:#953585;"/></td>
                <td>Data nascita:<br /><input type="text" name="dt_nascita" id="datepicker" value="<?php echo $dt_nascita_format; ?>" maxlength="10" style="background:url(images/element/bg-form-obbli.jpg) repeat-x #FFFFFF; color:#953585;">
<!--<input type="text" value="<?php echo $born_day; ?>" name="born_day" class="input_form_dd ui-corner-all" maxlength="2"/>
/
<input type="text" value="<?php echo $born_month; ?>" name="born_month" class="input_form_mm ui-corner-all" maxlength="2"/>
/
<input type="text" value="<?php echo $born_year; ?>" name="born_year" class="input_form_yyyy ui-corner-all" maxlength="4"/>-->
&nbsp;</td>
                <td><br />Mostrare et&agrave;&nbsp;
                  <input type="checkbox" value="N" <?php echo ($this->_f_mostra_dt_nascita=="S"?"checked='checked'":""); ?> name="f_mostra_dt_nascita" /></td>
              </tr>
              <tr>
<td colspan="3"><img src="images/1.gif" height=10 width="20"/></td>
              </tr>
              <tr>
                <td>Sesso:<br />
                  <select name="sesso" class="input_form ui-corner-all" style="background:url(images/element/bg-form-obbli.jpg) repeat-x #FFFFFF">
                    <option value="" <?=($this->_sesso == "" ? "selected" : "")?>>Non definito</option>
                    <option value="D" <?=($this->_sesso == "D" ? "selected" : "")?>>Donna</option>
                    <option value="U" <?=($this->_sesso == "U" ? "selected" : "")?>>Uomo</option>
                    <option value="T" <?=($this->_sesso == "T" ? "selected" : "")?>>Trans</option>
                  </select></td>
                <td>Altezza:<br />
                  <input type="text" value="<?php echo $this->_altezza; ?>" name="altezza" class="input_form_little ui-corner-all" maxlength="3"/>
                cm</td>
                <td>Peso:<br />
                  <input type="text" value="<?php echo $this->_peso; ?>" name="peso" class="input_form_little ui-corner-all" maxlength="3"/>
                kg</td>
              </tr>
              <tr>
<td colspan="3"><img src="images/1.gif" height=10 width="20"/></td>
              </tr>
              <tr>
                <td>Capelli:<br />
                  <select name="capelli" class="input_form ui-corner-all">
                    <option value="" <?=($this->_capelli == "" ? "selected" : "")?>>Non definito</option>
                    <option value="Bianchi" <?=($this->_capelli == "Bianchi" ? "selected" : "")?>>Bianchi</option>
                    <option value="Biondi" <?=($this->_capelli == "Biondi" ? "selected" : "")?>>Biondi</option>
                    <option value="Castani" <?=($this->_capelli == "Castani" ? "selected" : "")?>>Castani</option>
                    <option value="Mori" <?=($this->_capelli == "Mori" ? "selected" : "")?>>Mori</option>
                    <option value="Rossi" <?=($this->_capelli == "Rossi" ? "selected" : "")?>>Rossi</option>
                    <option value="Viola" <?=($this->_capelli == "Viola" ? "selected" : "")?>>Viola</option>
                  </select></td>
                <td>Occhi:<br />
                  <select name="occhi" class="input_form ui-corner-all">
                    <option value="" <?=($this->_occhi == "" ? "selected" : "")?>>Non definito</option>
                    <option value="Azzurri" <?=($this->_occhi == "Azzurri" ? "selected" : "")?>>Azzurri</option>
                    <option value="Blu" <?=($this->_occhi == "Blu" ? "selected" : "")?>>Blu</option>
                    <option value="Grigi" <?=($this->_occhi == "Grigi" ? "selected" : "")?>>Grigi</option>
                    <option value="Marroni" <?=($this->_occhi == "Marroni" ? "selected" : "")?>>Marroni</option>
                    <option value="Verdi" <?=($this->_occhi == "Verdi" ? "selected" : "")?>>Verdi</option>
                  </select></td>
                <td>Seno:<br />
                  <select name="seno" class="input_form ui-corner-all">
                    <option value="" <?=($this->_seno == "" ? "selected" : "")?>>Non definito</option>
                    <option value="1" <?=($this->_seno == "1" ? "selected" : "")?>>1&ordf;</option>
                    <option value="2" <?=($this->_seno == "2" ? "selected" : "")?>>2&ordf;</option>
                    <option value="3" <?=($this->_seno == "3" ? "selected" : "")?>>3&ordf;</option>
                    <option value="4" <?=($this->_seno == "4" ? "selected" : "")?>>4&ordf;</option>
                    <option value="5" <?=($this->_seno == "5" ? "selected" : "")?>>5&ordf;</option>
                    <option value="6" <?=($this->_seno == "6" ? "selected" : "")?>>6&ordf;</option>
                    <option value="7" <?=($this->_seno == "7" ? "selected" : "")?>>7&ordf;</option>
                  </select></td>
              </tr>
              <tr>
                <td colspan="3"><img src="images/1.gif" height=10 width="20"/></td>
              </tr>
              <tr>
                <td>Etnia:<br />
                  <select name="id_nazionalita">
                    <?php
			$id_nazionalita_utente = $this->_id_nazionalita;
			$res = $this->ReadAllNationes();
			while ($row = mysql_fetch_array($res))
			{    
				$id_nazionalita = $row["id_nazionalita"];
				$nome = stripslashes($row["nome"]);                 
				?>
                    <option value="<?=$id_nazionalita?>" <?if($id_nazionalita == $id_nazionalita_utente){echo "selected";}?>>
                    <?=$nome?>
                    </option>
                    <?
			}
			mysql_free_result($res);
			$id_citta = $this->_id_citta;
			$nome_citta = $this->GetCittaById($id_citta);
			$id_citta_tour = $this->_id_citta_tour;
			$nome_citta_tour = $this->GetCittaById($id_citta_tour);
			
			?>
                  </select></td>
                <td><div id="suggest">Citt&agrave;:<br />
                      <input type="text" size="25" value="<?=$nome_citta?>" autocomplete="off" name="nome_citta" id="searchtext" onKeyUp="suggest(this.value);" onBlur="fill();" class="input_form ui-corner-all"style="background:url(images/element/bg-form-obbli.jpg) repeat-x #FFFFFF; color:#953585;" />
                      <input type="hidden" value="<?=$id_citta?>" name="id_citta" id="searchid" size="3" />
                      <div class="suggestionsBox" id="suggestions" style="display:none ; height:20px">
                        <div class="suggestionList" id="suggestionsList"></div>
                      </div>
                </div></td>
                <td> Zona:<br />
<input type="text" value="<?php echo $this->_zona; ?>" name="zona" class="input_form ui-corner-all" maxlength="20" /></td>
              </tr>
              <tr>
                <td colspan="3"><img src="images/1.gif" alt="" width="20" height=10/></td>
              </tr>
              <tr>
                <td colspan="3"><h3>Servizi</h3></td>
              </tr>
              <tr>
                <td><br />Orari:<br />
                dalle <select name="orario_da">
                      <option value="00:00" <?=($this->_orario_da == "00:00" ? "selected" : "")?>>00:00</option>
                      <option value="01:00" <?=($this->_orario_da == "01:00" ? "selected" : "")?>>01:00</option>
                      <option value="02:00" <?=($this->_orario_da == "02:00" ? "selected" : "")?>>02:00</option>
                      <option value="03:00" <?=($this->_orario_da == "03:00" ? "selected" : "")?>>03:00</option>
                      <option value="04:00" <?=($this->_orario_da == "04:00" ? "selected" : "")?>>04:00</option>
                      <option value="05:00" <?=($this->_orario_da == "05:00" ? "selected" : "")?>>05:00</option>
                      <option value="06:00" <?=($this->_orario_da == "06:00" ? "selected" : "")?>>06:00</option>
                      <option value="07:00" <?=($this->_orario_da == "07:00" ? "selected" : "")?>>07:00</option>
                      <option value="08:00" <?=($this->_orario_da == "08:00" ? "selected" : "")?>>08:00</option>
                      <option value="09:00" <?=($this->_orario_da == "09:00" ? "selected" : "")?>>09:00</option>
                      <option value="10:00" <?=($this->_orario_da == "10:00" ? "selected" : "")?>>10:00</option>
                      <option value="11:00" <?=($this->_orario_da == "11:00" ? "selected" : "")?>>11:00</option>
                      <option value="12:00" <?=($this->_orario_da == "12:00" ? "selected" : "")?>>12:00</option>
                      <option value="13:00" <?=($this->_orario_da == "13:00" ? "selected" : "")?>>13:00</option>
                      <option value="14:00" <?=($this->_orario_da == "14:00" ? "selected" : "")?>>14:00</option>
                      <option value="15:00" <?=($this->_orario_da == "15:00" ? "selected" : "")?>>15:00</option>
                      <option value="16:00" <?=($this->_orario_da == "16:00" ? "selected" : "")?>>16:00</option>
                      <option value="17:00" <?=($this->_orario_da == "17:00" ? "selected" : "")?>>17:00</option>
                      <option value="18:00" <?=($this->_orario_da == "18:00" ? "selected" : "")?>>18:00</option>
                      <option value="19:00" <?=($this->_orario_da == "19:00" ? "selected" : "")?>>19:00</option>
                      <option value="20:00" <?=($this->_orario_da == "20:00" ? "selected" : "")?>>20:00</option>
                      <option value="21:00" <?=($this->_orario_da == "21:00" ? "selected" : "")?>>21:00</option>
                      <option value="22:00" <?=($this->_orario_da == "22:00" ? "selected" : "")?>>22:00</option>
                      <option value="23:00" <?=($this->_orario_da == "23:00" ? "selected" : "")?>>23:00</option>
                      <option value="24:00" <?=($this->_orario_da == "24:00" ? "selected" : "")?>>24:00</option>
                    </select> 
               alle <select name="orario_a">
                      <option value="00:00" <?=($this->_orario_a == "00:00" ? "selected" : "")?>>00:00</option>
                      <option value="01:00" <?=($this->_orario_a == "01:00" ? "selected" : "")?>>01:00</option>
                      <option value="02:00" <?=($this->_orario_a == "02:00" ? "selected" : "")?>>02:00</option>
                      <option value="03:00" <?=($this->_orario_a == "03:00" ? "selected" : "")?>>03:00</option>
                      <option value="04:00" <?=($this->_orario_a == "04:00" ? "selected" : "")?>>04:00</option>
                      <option value="05:00" <?=($this->_orario_a == "05:00" ? "selected" : "")?>>05:00</option>
                      <option value="06:00" <?=($this->_orario_a == "06:00" ? "selected" : "")?>>06:00</option>
                      <option value="07:00" <?=($this->_orario_a == "07:00" ? "selected" : "")?>>07:00</option>
                      <option value="08:00" <?=($this->_orario_a == "08:00" ? "selected" : "")?>>08:00</option>
                      <option value="09:00" <?=($this->_orario_a == "09:00" ? "selected" : "")?>>09:00</option>
                      <option value="10:00" <?=($this->_orario_a == "10:00" ? "selected" : "")?>>10:00</option>
                      <option value="11:00" <?=($this->_orario_a == "11:00" ? "selected" : "")?>>11:00</option>
                      <option value="12:00" <?=($this->_orario_a == "12:00" ? "selected" : "")?>>12:00</option>
                      <option value="13:00" <?=($this->_orario_a == "13:00" ? "selected" : "")?>>13:00</option>
                      <option value="14:00" <?=($this->_orario_a == "14:00" ? "selected" : "")?>>14:00</option>
                      <option value="15:00" <?=($this->_orario_a == "15:00" ? "selected" : "")?>>15:00</option>
                      <option value="16:00" <?=($this->_orario_a == "16:00" ? "selected" : "")?>>16:00</option>
                      <option value="17:00" <?=($this->_orario_a == "17:00" ? "selected" : "")?>>17:00</option>
                      <option value="18:00" <?=($this->_orario_a == "18:00" ? "selected" : "")?>>18:00</option>
                      <option value="19:00" <?=($this->_orario_a == "19:00" ? "selected" : "")?>>19:00</option>
                      <option value="20:00" <?=($this->_orario_a == "20:00" ? "selected" : "")?>>20:00</option>
                      <option value="21:00" <?=($this->_orario_a == "21:00" ? "selected" : "")?>>21:00</option>
                      <option value="22:00" <?=($this->_orario_a == "22:00" ? "selected" : "")?>>22:00</option>
                      <option value="23:00" <?=($this->_orario_a == "23:00" ? "selected" : "")?>>23:00</option>
                      <option value="24:00" <?=($this->_orario_a == "24:00" ? "selected" : "")?>>24:00</option>
                    </select> </td>
                <td><br />Servizi:<br>
					  <select name="tipo_servizi">
                      <option value="Incall" <?=($this->_tipo_servizi == "Incall" ? "selected" : "")?>>Incall</option>
                      <option value="Outcall" <?=($this->_tipo_servizi == "Outcall" ? "selected" : "")?>>Outcall</option>
                      <option value="Incall-Outcall" <?=($this->_tipo_servizi == "Incall-Outcall" ? "selected" : "")?>>Incall-Outcall</option>
                      </select>                      	</td>
                <td><br />Servizi dedicati a:<br>
					<input name="f_disp_uomini" type="checkbox" value="N" <?php echo ($this->_f_disp_uomini=="S"?"checked='checked'":""); ?>>Uomini <input name="f_disp_donne" type="checkbox" value="N" <?php echo ($this->_f_disp_donne=="S"?"checked='checked'":""); ?>>Donne <input name="f_disp_coppie" type="checkbox" value="N" <?php echo ($this->_f_disp_coppie=="S"?"checked='checked'":""); ?>>Coppie</td>
              </tr>
              <tr>
                <td colspan="3"><img src="images/1.gif" height=10 width="20"/></td>
              </tr>
              
              <tr>
                <td colspan="3"><h3>Tour</h3></td>
              </tr>
              <tr>
                <td colspan="3">
                	<div id="suggest"><br />Citt&agrave;:<br />
                      <input type="text" size="25" value="<?=$nome_citta_tour?>" autocomplete="off" name="nome_citta_tour" id="searchtext2" onKeyUp="suggest2(this.value);" onBlur="fill2();" class="input_form ui-corner-all" />
                      <input type="hidden" value="<?=$id_citta_tour?>" name="id_citta_tour" id="searchid2" size="3" />
                      <div class="suggestionsBox" id="suggestions2" style="display:none ; height:20px">
                        <div class="suggestionList" id="suggestionsList2"></div>
                      </div> dal <input type="text" name="dt_da_tour" id="datepicker2" value="<?php echo $dt_da_tour_format; ?>" maxlength="10"> al <input type="text" name="dt_a_tour" id="datepicker3" value="<?php echo $dt_a_tour_format; ?>" maxlength="10">
                </div>                </td>
              </tr>
              <tr>
                <td colspan="3"><img src="images/1.gif" alt="" width="20" height=30/></td>
              </tr>
              <tr>
                <td colspan="3"><h3>Inserisci posizione su Mappa</h3>
                    <span style="font-size:90%">(E' sufficiente inserire Cap e via, senza il numero civico)</span><br /></td>
              </tr>
              <tr>
                <td>Cap<br />
                <input name="cap" type="text" class="input_form ui-corner-all" value="<?php echo $this->_cap; ?>" size="6" maxlength="5" /></td>
                <td colspan="2">Via:<br />
                    <select name="tipo_via">
                      <option value="" <?if($this->_tipo_via == ""){echo "selected";}?>>Nessuna</option>
                      <option value="Via" <?if($this->_tipo_via == "Via"){echo "selected";}?>>Via</option>
                      <option value="Viale" <?if($this->_tipo_via == "Viale"){echo "selected";}?>>Viale</option>
                      <option value="Piazza" <?if($this->_tipo_via == "Piazza"){echo "selected";}?>>Piazza</option>
                      <option value="Corso" <?if($this->_tipo_via == "Corso"){echo "selected";}?>>Corso</option>
                      <option value="Largo" <?if($this->_tipo_via == "Largo"){echo "selected";}?>>Largo</option>
                    </select>
                    <input type="text" value="<?php echo $this->_indirizzo; ?>" name="indirizzo" class="input_form ui-corner-all" maxlength="50" />
n&deg;                    
<input type="text" value="<?php echo $this->_civico; ?>" name="civico" class="input_form ui-corner-all" maxlength="10" size="8" /></td>
              </tr>
              <tr>
                <td colspan="3"><img src="images/1.gif" alt="" width="20" height="10"/></td>
              </tr>
              <tr>
                <td colspan="3"><h3>Contatti</h3><br /></td>
              </tr>
              <tr>
                <td>Telefono 1:<br />
                  <input type="text" value="<?php echo $this->_prefisso1; ?>" name="prefisso1" class="input_form ui-corner-all" maxlength="4" style="background:url(images/element/bg-form-obbli.jpg) repeat-x #FFFFFF; color:#953585" title="prefisso 1"  size="4" />
                  /
                  <input type="text" value="<?php echo $this->_telefono1; ?>" name="telefono1" class="input_form ui-corner-all" maxlength="8" style="background:url(images/element/bg-form-obbli.jpg) repeat-x #FFFFFF; color:#953585" title="telefono 1" size="8"/></td>
                <td>Telefono 2:<br />
                	<input type="text" value="<?php echo $this->_prefisso2; ?>" name="prefisso2" class="input_form ui-corner-all" maxlength="4" title="prefisso 2"  size="4" />
                	/
                  	<input type="text" value="<?php echo $this->_telefono2; ?>" name="telefono2" class="input_form ui-corner-all" maxlength="8" title="telefono 2" size="8"/></td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td colspan="3"><img src="images/1.gif" alt="" width="20" height="10"/></td>
              </tr>
              <tr>
                <td colspan="3"><h3>Annuncio</h3>
                <br /></td>
              </tr>
              <tr>
                <td colspan="3"><div align="center">
  <textarea name="annuncio" class="input_form_big ui-corner-all" maxlength="" cols="100" rows="7" style="background:url(images/element/bg-form-obbli-big.jpg) repeat-x #FFFFFF; color:#953585"><?php echo $this->_annuncio;?></textarea>
  <br />
  &nbsp;max 1.000 caratteri</div></td>
              </tr>
              <tr>
                <td colspan="3"><img src="images/1.gif" alt="" width="20" height="10"/></td>
              </tr>
              <tr>
                <td colspan="3"><h3>Dati di accesso</h3><br />                </td>
              </tr>
              <tr>
                <td>Username:<br><input type="text" value="<?php echo $this->_username; ?>" readonly="readonly" class="input_form ui-corner-all" /></td>
                <td>email:<br />
                  <input type="text" class="input_form ui-corner-all" value="<?php echo $this->_email; ?>" size="30" readonly="readonly" /></td>
                <td><!--<input type="checkbox" value="1" <?php echo $this->_mailer; ?> name="mailer" />
                &nbsp;Funzione mailer-->
                Profilo attivo<br />
                  <select name="f_attivo" class="input_form ui-corner-all" style="background:url(images/element/bg-form-obbli.jpg) repeat-x #FFFFFF; color:#953585;">
                    <option value="S" <?=($this->_f_attivo == "S" ? "selected" : "")?>>Si</option>
                    <option value="N" <?=($this->_f_attivo == "N" ? "selected" : "")?>>No</option>
                  </select></td>              
              </tr>
              <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
            </table>
<br>
			<input type="submit" value="Salva" name="data" class="bott ui-corner-all ui-state-default" />
		
		</form>
	</div>


	<div id="tabs-2" style="background:url(images/bggs.png) repeat-x top; font-size:11px">
		<h1>Modifica password</h1><br>
		
		<form action="profile_action.php" method="POST">
			Nuova password:<br>
			<input type="password" class="input_form ui-corner-all" name="password" /><br><br>
			Riscrivi password:<br>
			<input type="password" class="input_form ui-corner-all" name="password2" /><br><br>
			<input type="submit" value="modifica" name="pass" class="butt ui-corner-all ui-state-default" />	
		</form>
	
	</div>
	<div id="tabs-3" style="background:url(images/bggll.png) #a7769d repeat-x; font-size:11px;">
		<h1>Carica le foto per l'annuncio</h1>
		<br>
	<?
    if($sn_profilo_attivo=="S") {?>
		Caricare le foto che intendi pubblicare nel tuo annuncio &egrave; semplice e veloce. Clicca sul tasto sottostante. <br />
        <a href="upload_crop.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image10','','images/bc-upload-on.png',1)"><img src="images/bc-upload.png" alt="Carica le tue foto nell'annuncio" name="Image10" border="0" id="Image10" align="center" style="margin:15px" /></a></b>	
      
      <div>
   		<table border="0" cellspacing="8">
		<?php
        
        while ($row = mysql_fetch_array($this->_result))
        {    
            $nome_foto = stripslashes($row['nome_foto']);
            $ordine = $row['ordine'];
            $f_attiva = $row['f_attiva'];
            $f_principale = $row['f_principale'];			
            ?>
        <tr >
		  <td colspan="4" style="border-top:#230237 1px dotted">&nbsp;</td>
	    </tr>    
		<tr>
            <td>
                <img src="images/users/<?php echo $nome_foto; ?>" border="0" height="200px" class="brd">
          </td>
                   
            <td valign="top" align="left">
                <img src="images/users/box/<?php echo $nome_foto; ?>" border="0" class="brd2">
            </td>
            <td valign="top" align="left">
                <label style="color:#FF33CC; font-size:0.7em"><?php echo($f_principale=="S" ? "<img src=images/Check-icon.png>Principale" : ""); ?></label>
            </td>
            
            <td align="center">
            <form action="profile_photo_action.php" method="POST" name="delete_foto" runat="server">
                <input type="hidden" value="<?php echo $nome_foto; ?>" name="nome_foto" />	
                <input type="hidden" value="<?php echo $f_principale; ?>" name="f_principale" />
                <input type="submit" value="" name="modify_thumb" class="bt3" style="margin-bottom:4px" title="Modifica la miniatura" onMouseOver="this.className='bt3h'" onMouseOut="this.className='bt3'" />
              <br>
              <input type="submit" value="" name="delete_foto" class="bt1" style="margin-bottom:4px" title="Elimina la foto" onMouseOver="this.className='bt1h'" onMouseOut="this.className='bt1'" onClick="return confirm('Sei sicuro di voler cancellare la foto?');" />
            <br>
            <input type="submit" value="" name="set_foto_principale" class="bt2" title="Imposta come principale" onMouseOver="this.className='bt2h'" onMouseOut="this.className='bt2'" />
            </form>
            </td>
		</tr>
            <?		
        } 
		if($this->_total_votes=="")		
			$total_votes = 0;
		else
			$total_votes = $this->_total_votes;
			
        mysql_free_result($this->_result);   
        ?>

	</table>
	</div>	
  <?
} else 
echo ("Attenzione! Alcuni dati obbligatori non sono ancora stati inseriti. Fino ad allora non si potranno caricare le foto e pubblicare l'annuncio.");
?>	
  </div>
	<div id="tabs-4" style="background:url(images/bggs.png) repeat-x top; font-size:11px">
		<h1>Statistiche profilo</h1><br>
	<?
    if($sn_profilo_attivo=="S")  {?>		
			Visite totali:&nbsp;<?php echo $this->_num_click_tot; ?><br><br>
			Visite mensili:&nbsp;<?php echo $this->_num_click_mese; ?><br><br>
			Num Voti:&nbsp;<?php echo $total_votes; ?><br><br>
            <?		
       	 	if($total_votes>0)  
        		echo "Media Voti:&nbsp;".round($this->_total_value/$total_votes, 2)." su 6<br><br>";			
    } else 
	echo ("Attenzione! Alcuni dati obbligatori non sono ancora stati inseriti. Fino ad allora non si potranno caricare le foto, pubblicare l'annuncio e visualizzare le statistiche.");

    ?>
	</div>
</div>

